{% extends "admin/base.html" %}

{% block extrastyle %}
<style type="text/css">
	@import "/media/js/simp/dojo/resources/dojo.css";
	@import "/media/js/simp/dijit/themes/tundra/tundra.css";
	/*@import "/media/js/simp/dojox/grid/_grid/tundraGrid.css";*/
	@import "/media/js/simp/simp/simpTundra.css";
</style>
{% endblock extrastyle %}

{% block extrahead %}
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE" />
<meta http-equiv="PRAGMA" content="NO-CACHE" /> 
<script type="text/javascript">
var djConfig = {
	parseOnLoad: true,
	isDebug: true, 
	debugAtAllCosts: false,
	usePlainJson: true,
};
</script>
<script type="text/javascript" src="/media/js/simp/dojo/dojo.js"></script>
<script type="text/javascript" src="{{ baseUrl }}scripts/"></script>
{% endblock extrahead %}

{% block bodyclass %}tundra{% endblock %}

{% block content %}
<div id="simp_container" dojoType="dijit.layout.BorderContainer" design="sidebar" style="height: 750px;padding: 5px;">
	{% if has_toolbar %}
	<div dojoType="dijit.layout.ContentPane" class="header" region="top" id="simp_header" style="height: 30px">
		{% for mod in modules %}
			{{ mod.get_toolbar|safe }}
		{% endfor %}
	</div>
	{% endif %}

	<div dojoType="dijit.layout.ContentPane" region="center" id="simp_imageEditArea">
		{{ editor }}
	</div>

	<div dojoType="dijit.layout.ContentPane" region="bottom" id="simp_bottom" style="height: 30px">
		<div dojoType="dijit.layout.ContentPane" id="messageBox" style="float: left; margin-top: auto;"><b>message</b></div>
		<div dojoType="dijit.form.Button" style="float: right;">
			<b>save</b>
			<script type="dojo/method" event="onClick">
				ctrl.save();
			</script>
		</div>
		<div dojoType="dijit.form.Button" style="float: right;">
			<b>cancel</b>
			<script type="dojo/method" event="onClick">
				ctrl.cancle();
			</script>
		</div>
		<input type="hidden" id="simp_instance" value="{{ instance }}" />
		<input type="hidden" id="simp_image" value='{{ file|safe }}' />
		<input type="hidden" id="simp_baseUrl" value="{{ baseUrl }}" />
	</div>

</div>
{% endblock %}

